import Router from '@koa/router';
import * as tagController from '../controllers/tag.controller';
import { authMiddleware } from '../middleware/auth';

const router = new Router({
  prefix: '/api/tags',
});

// 所有路由都需要认证
router.use(authMiddleware);

// 创建标签
router.post('/create', tagController.createTag);

// 更新标签
router.post('/update', tagController.updateTag);

// 删除标签
router.post('/delete', tagController.deleteTag);

// 查询标签列表
router.post('/list', tagController.getTagList);

// 查询标签详情
router.post('/detail', tagController.getTagDetail);

export default router;

